<!DOCTYPE html>
<html >
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    
    <title>CentOS6支持到期后配置备份更新源 | xilixili.net</title>
    <meta name="renderer" content="webkit">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <meta name="description" content="CentOS 6 的支持在上个月到期了，各个更新源都下线了，线上一堆的服务器又不能升级，偶尔安装个软件可怎么办，其实官方还保留了一个备份的源用来更新，虽然不升级了，但至少安装软件没问题。
配置备份虽然说备份已经没啥用了，但是作为良好的操作习惯，还是建议做一下。
备份目录 /etc/yum.repo.d/ ,将里面官方的 repo 文件都备份，备份之后删除目录内容，如果里面有其他未下线的仓库配置，暂">

    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="CentOS6支持到期后配置备份更新源 | xilixili.net">
    <meta name="twitter:description" content="CentOS 6 的支持在上个月到期了，各个更新源都下线了，线上一堆的服务器又不能升级，偶尔安装个软件可怎么办，其实官方还保留了一个备份的源用来更新，虽然不升级了，但至少安装软件没问题。
配置备份虽然说备份已经没啥用了，但是作为良好的操作习惯，还是建议做一下。
备份目录 /etc/yum.repo.d/ ,将里面官方的 repo 文件都备份，备份之后删除目录内容，如果里面有其他未下线的仓库配置，暂">

    <meta property="og:type" content="article">
    <meta property="og:title" content="CentOS6支持到期后配置备份更新源 | xilixili.net">
    <meta property="og:description" content="CentOS 6 的支持在上个月到期了，各个更新源都下线了，线上一堆的服务器又不能升级，偶尔安装个软件可怎么办，其实官方还保留了一个备份的源用来更新，虽然不升级了，但至少安装软件没问题。
配置备份虽然说备份已经没啥用了，但是作为良好的操作习惯，还是建议做一下。
备份目录 /etc/yum.repo.d/ ,将里面官方的 repo 文件都备份，备份之后删除目录内容，如果里面有其他未下线的仓库配置，暂">

    
    <meta name="author" content="rangerlee">
    
    <link rel="stylesheet" href="/css/vno.css">
    <link rel="stylesheet" href="/css/font-awesome.min.css">

    
    <link rel="icon" href="/images/avatar-small.png">
    

    <meta name="generator" content="hexo"/>
    
    <link rel="alternate" type="application/rss+xml" title="xilixili.net" href="/atom.xml">
    

    <link rel="canonical" href="xilixili.net/2020/12/14/centos-6-config-vault-yum-repo/"/>

                 
</head>

<body class="home-template no-js">
    <script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="/js/main.js"></script>
    <span class="mobile btn-mobile-menu">
        <i class="fa fa-list btn-mobile-menu__icon"></i>
        <i class="fa fa-angle-up btn-mobile-close__icon hidden"></i>
    </span>

    
<header class="panel-cover panel-cover--collapsed">
  <div class="panel-main">
    <div class="panel-main__inner panel-inverted">
    <div class="panel-main__content">

        <h1 class="panel-cover__title panel-title"><a href="/" title="访问首页 xilixili.net">xilixili.net</a></h1>
        
        <span class="panel-cover__subtitle panel-subtitle"><!-- 生活と技术の杂记 --></span>
        
        <hr class="panel-cover__divider">
        
        <p class="panel-cover__description">生活と技术の杂记</p>
        
	<hr class="panel-cover__divider panel-cover__divider--secondary">

        <div class="navigation-wrapper">
          <div>
          <nav class="cover-navigation cover-navigation--primary">
            <ul class="navigation">
              <li class="navigation__item"><a href="/#blog" title="访问博客" class="blog-button">博客</a></li>
            
            </ul>
          </nav>
          </div>
          <div>
          <nav class="cover-navigation navigation--social">
  <ul class="navigation">

  <!-- Weibo-->
  

  <!-- Github -->
  
  <li class="navigation__item">
    <a href="https://github.com/rangerlee" title="查看我的GitHub主页" target="_blank">
      <i class="social fa fa-github"></i>
      <span class="label">Github</span>
    </a>
  </li>


<!-- Stack Overflow -->
        

  <!-- Google Plus -->
  

<!-- Facebook -->

  
<!-- Twitter -->

  

  <li class="navigation__item">
    <a href="/atom.xml" title="RSS" target="_blank">
      <i class="social fa fa-rss"></i>
      <span class="label">RSS</span>
    </a>
  </li>


  <li class="navigation__item">
    <a href="mailto:http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;email=RzUmKSAiNSsiIgchKD8qJi4raSQoKg" title="邮件联系我" target="_blank">
      <i class="social fa fa-envelope"></i>
      <span class="label">Email</span>
    </a>
  </li>


  </ul>
</nav>

          </div>
        </div>

      </div>

    </div>

    <div class="panel-cover--overlay cover-alpha"></div>
  </div> 
</header>
<script type="text/javascript">
var side = document.getElementsByClassName("panel-cover")[0];
function checkWebp() {
	try{
		return(document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') == 0);
	}catch(err) {
		return false;
	}
};

if(checkWebp()) {
	side.style.backgroundImage = "url('/images/background-cover.jpg.webp')";
} else {
	side.style.backgroundImage = "url('/images/background-cover.jpg')";
}
</script>


    <div class="content-wrapper">
        <div class="content-wrapper__inner">
            <article class="post-container post-container--single">

  <header class="post-header">
    <div class="post-meta">
      <time datetime="2020-12-14T09:41:00.000Z" class="post-list__meta--date date">2020-12-14</time> &#8226; <span class="post-meta__tags tags">
  <a class="tag-link" href="/tags/技术/">技术</a>
 </span>
      <span class="page-pv">
       阅读 <span id="busuanzi_value_page_pv"><i class="fa fa-spinner fa-spin"></i></span>
      </span> 
   
    </div>
    <h1 class="post-title">CentOS6支持到期后配置备份更新源</h1>
  </header>

  <section class="post">
    <p>CentOS 6 的支持在上个月到期了，各个更新源都下线了，线上一堆的服务器又不能升级，偶尔安装个软件可怎么办，其实官方还保留了一个备份的源用来更新，虽然不升级了，但至少安装软件没问题。</p>
<h3 id="配置备份"><a href="#配置备份" class="headerlink" title="配置备份"></a>配置备份</h3><p>虽然说备份已经没啥用了，但是作为良好的操作习惯，还是建议做一下。</p>
<p>备份目录 <code>/etc/yum.repo.d/</code> ,将里面官方的 repo 文件都备份，备份之后删除目录内容，如果里面有其他未下线的仓库配置，暂时保留该配置文件。</p>
<h3 id="新建仓库配置"><a href="#新建仓库配置" class="headerlink" title="新建仓库配置"></a>新建仓库配置</h3><p>在该目录下创建新的配置，比如 <code>CentOS.repo</code> ，名称随便起，内容如下</p>
<figure class="highlight ini"><table><tr><td class="code"><pre><span class="line"><span class="section">[base]</span></span><br><span class="line"><span class="attr">name</span>=CentOS-x<span class="number">86_64</span> - Base </span><br><span class="line"><span class="attr">failovermethod</span>=priority</span><br><span class="line"><span class="attr">baseurl</span>=http://vault.centos.org/<span class="number">6.10</span>/os/x<span class="number">86_64</span>/</span><br><span class="line"><span class="attr">gpgcheck</span>=<span class="number">1</span></span><br><span class="line"><span class="attr">gpgkey</span>=http://vault.centos.org/RPM-GPG-KEY-CentOS-<span class="number">6</span></span><br><span class="line"> </span><br><span class="line"><span class="comment">#released updates </span></span><br><span class="line"><span class="section">[updates]</span></span><br><span class="line"><span class="attr">name</span>=CentOS-x<span class="number">86_64</span> - Updates </span><br><span class="line"><span class="attr">failovermethod</span>=priority</span><br><span class="line"><span class="attr">baseurl</span>=http://vault.centos.org/<span class="number">6.10</span>/updates/x<span class="number">86_64</span>/</span><br><span class="line"><span class="attr">gpgcheck</span>=<span class="number">1</span></span><br><span class="line"><span class="attr">gpgkey</span>=http://vault.centos.org/RPM-GPG-KEY-CentOS-<span class="number">6</span></span><br><span class="line"> </span><br><span class="line"><span class="comment">#additional packages that may be useful</span></span><br><span class="line"><span class="section">[extras]</span></span><br><span class="line"><span class="attr">name</span>=CentOS-x<span class="number">86_64</span> - Extras </span><br><span class="line"><span class="attr">failovermethod</span>=priority</span><br><span class="line"><span class="attr">baseurl</span>=http://vault.centos.org/<span class="number">6.5</span>/extras/x<span class="number">86_64</span>/</span><br><span class="line"><span class="attr">gpgcheck</span>=<span class="number">1</span></span><br><span class="line"><span class="attr">gpgkey</span>=http://vault.centos.org/RPM-GPG-KEY-CentOS-<span class="number">6</span></span><br><span class="line"> </span><br><span class="line"><span class="comment">#additional packages that extend functionality of existing packages</span></span><br><span class="line"><span class="section">[centosplus]</span></span><br><span class="line"><span class="attr">name</span>=CentOS-x<span class="number">86_64</span> - Plus </span><br><span class="line"><span class="attr">failovermethod</span>=priority</span><br><span class="line"><span class="attr">baseurl</span>=http://vault.centos.org/<span class="number">6.10</span>/centosplus/x<span class="number">86_64</span>/</span><br><span class="line"><span class="attr">gpgcheck</span>=<span class="number">1</span></span><br><span class="line"><span class="attr">enabled</span>=<span class="number">0</span></span><br><span class="line"><span class="attr">gpgkey</span>=http://vault.centos.org/RPM-GPG-KEY-CentOS-<span class="number">6</span></span><br><span class="line"> </span><br><span class="line"><span class="comment">#contrib - packages by Centos Users</span></span><br><span class="line"><span class="section">[contrib]</span></span><br><span class="line"><span class="attr">name</span>=CentOS-x<span class="number">86_64</span> - Contrib </span><br><span class="line"><span class="attr">failovermethod</span>=priority</span><br><span class="line"><span class="attr">baseurl</span>=http://vault.centos.org/<span class="number">6.10</span>/contrib/x<span class="number">86_64</span>/</span><br><span class="line"><span class="attr">gpgcheck</span>=<span class="number">1</span></span><br><span class="line"><span class="attr">enabled</span>=<span class="number">0</span></span><br><span class="line"><span class="attr">gpgkey</span>=http://vault.centos.org/RPM-GPG-KEY-CentOS-<span class="number">6</span></span><br></pre></td></tr></table></figure>
<h3 id="更新仓库"><a href="#更新仓库" class="headerlink" title="更新仓库"></a>更新仓库</h3><p>配置之后就可以更新了，简单的直接操作下面的命令</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">yum makecache</span><br></pre></td></tr></table></figure>
<p>更新完成之后，就可以像往常一样愉快的安装软件了~</p>

  </section>

</article>

<section class="read-more">
           
    
               
            <div class="read-more-item">
                <span class="read-more-item-dim">最近的文章</span>
                <h2 class="post-list__post-title post-title"><a href="/2021/02/08/h264-get-width-height-from-sps/" title="从H264中SPS计算宽高">从H264中SPS计算宽高</a></h2>
                <p class="excerpt">
                
                最近在处理H264流的时候发现计算的宽高并不正确。
基本计算方法大家都知道SPS解析之后，宽高就可以通过下面的计算公式计算出来：

宽 (pic_width_in_mbs_minus1 + 1) * 16
高 (pic_height_in_map_units_minus1 + 1) * 16

然而
                &hellip;
                </p>
                <div class="post-list__meta"><time datetime="2021-02-08T10:54:00.000Z" class="post-list__meta--date date">2021-02-08</time> &#8226; <span class="post-list__meta--tags tags">
  <a class="tag-link" href="/tags/技术/">技术</a>
</span><a class="btn-border-small" href="/2021/02/08/h264-get-width-height-from-sps/">继续阅读</a></div>
                           
            </div>
        
        
               
            <div class="read-more-item">
                <span class="read-more-item-dim">更早的文章</span>
                <h2 class="post-list__post-title post-title"><a href="/2020/11/09/boost-property-tree-not-support-non-string-in-json/" title="BOOST不支持JSON输出数字值">BOOST不支持JSON输出数字值</a></h2>
                <p class="excerpt">
                
                前文刚讲述过boost的porperty_tree在JSON上的一些问题，最近使用又发现一些问题，可能大家都可能发现了，就是用该库来生成JSON的时候，不支持数字等非字符串类型的值。
                &hellip;
                </p>
                <div class="post-list__meta"><time datetime="2020-11-09T07:23:00.000Z" class="post-list__meta--date date">2020-11-09</time> &#8226; <span class="post-list__meta--tags tags">
  <a class="tag-link" href="/tags/技术/">技术</a>
</span><a class="btn-border-small" href="/2020/11/09/boost-property-tree-not-support-non-string-in-json/">继续阅读</a></div>
                       
            </div>
        
     
   
   
  
</section>



	<script>
	(function(){
		var bp = document.createElement('script');
		var curProtocol = window.location.protocol.split(':')[0];
		if (curProtocol === 'https') {
			bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
		}
		else {
			bp.src = 'http://push.zhanzhang.baidu.com/push.js';
		}
		var s = document.getElementsByTagName("script")[0];
		s.parentNode.insertBefore(bp, s);
	})();
	</script>



<script>
(function(){
var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?8612a7fa26d7ba4562be733ae33649b1":"https://jspassport.ssl.qhimg.com/11.0.1.js?8612a7fa26d7ba4562be733ae33649b1";
document.write('<script src="' + src + '" id="sozz"><\/script>');
})();
</script>



            <footer class="footer">
    <span class="footer__copyright">
        &copy; 2023 rangerlee - 本站点采用 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>
       
    </span>
    <span class="footer__copyright">
             - 本站基于开源 <a href="http://hexo.io">Hexo</a> 搭建，采用 <a href="https://github.com/rangerlee/hexo-theme-new-vno">hexo-theme-new-vno</a> 主题，修改自 <a href="https://github.com/monniya/hexo-theme-new-vno ">new-vno</a> 主题  <a href="http://www.beian.miit.gov.cn">皖ICP备16009457号</a>
         </span>
       
    
    
</footer>


        </div>
    </div>

     
    
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?bab4f71524319c10819bcae280021624";
            var s = document.getElementsByTagName("script")[0]; 
            s.parentNode.insertBefore(hm, s);
        })();
    </script>



    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    
    
</body>
</html>
